Exit early if we can't get file info - this happens if the iter points to
authorMatthias Clasen <mclasen@redhat.com>
Thu, 4 Jan 2007 01:45:19 +0000 (01:45 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 4 Jan 2007 01:45:19 +0000 (01:45 +0000)
2007-01-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (update_chooser_entry):
        Exit early if we can't get file info - this happens
        if the iter points to the row where we are editing
        the name for a newly created folder.  (#392191, Michael
        Partridge, patch by Kristian Rietveld)

svn path=/trunk/; revision=17046

ChangeLog
gtk/gtkfilechooserdefault.c

index 688b7601dac31fb1c8b953422aad264b97e70316..edf3d5c4ff8e4751ac4c28f6878530cf9d6d0393 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-01-03  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilechooserdefault.c (update_chooser_entry):
+       Exit early if we can't get file info - this happens
+       if the iter points to the row where we are editing
+       the name for a newly created folder.  (#392191, Michael
+       Partridge, patch by Kristian Rietveld)
+
 2007-01-03  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/*.c:
index f029996091a5278aeaffb79c53a4e5273a192308..1e1969f7d58ae736e7b020b0aad3f09233d1c3b2 100644 (file)
@@ -6139,6 +6139,12 @@ update_chooser_entry (GtkFileChooserDefault *impl)
 
       info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter);
 
+      /* If the cursor moved to the row of the newly created folder, 
+       * retrieving info will return NULL.
+       */
+      if (!info)
+       return;
+
       g_free (impl->browse_files_last_selected_name);
       impl->browse_files_last_selected_name = g_strdup (gtk_file_info_get_display_name (info));